<?php if ($success === true): ?>
    <div class='alert alert-success'>
        Se importaron correctamente <?php echo count($creditosOK); ?> créditos.
    </div>
    <table class='table table-bordered table-condensed table-striped'>
        <thead>
            <tr>
                <th>R.F.C.</th>
                <th>Folio</th>
                <th>Delegación</th>
                <th>Nombre(s)</th>
                <th>A. paterno</th>
                <th>A. materno</th>
                <th>Cuenta bancaria</th>
                <th>Monto del crédito</th>
                <th>Plazo</th>
                <th>Pago mensual</th>
                <th>Monto total</th>
                <th>Ahorro</th>
                <th>Interés mensual</th>
                <th>Instrumento</th>
                <th>Fecha instrumento</th>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($creditosOK as $credito) : ?>
                <tr>
                    <td><?php echo $credito['rfc']; ?></td>
                    <td><?php echo $credito['folio']; ?></td>
                    <td><?php echo $credito['delegacion']; ?></td>
                    <td><?php echo $credito['nombre']; ?></td>
                    <td><?php echo $credito['paterno']; ?></td>
                    <td><?php echo $credito['materno']; ?></td>
                    <td><?php echo $credito['cuenta']; ?></td>
                    <td><?php echo $credito['monto']; ?></td>
                    <td><?php echo $credito['plazo']; ?></td>
                    <td><?php echo $credito['pagoMensual']; ?></td>
                    <td><?php echo $credito['totalPago']; ?></td>
                    <td><?php echo $credito['ahorro']; ?></td>
                    <td><?php echo $credito['interes']; ?></td>
                    <td><?php echo $credito['instrumento']; ?></td>
                    <td><?php echo $credito['fechaInstrumento']; ?></td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>
<?php else: ?>
    <div class='alert alert-danger'>
        <?php echo $msgError; ?>
    </div>
    <a href='<?php echo $this->Html->url(array('action' => 'creditosNuevos')); ?>' class='btn btn-warning'>
        Importar otro archivo
    </a>
<?php endif; ?>

